home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / gfx / lise2.1 / lise / src / tsf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-31  |  1.3 KB  |  53 lines

  1. #include <stdio.h>
  2. #ifdef AMIGA
  3. #include <gfxamiga.h>
  4. #else
  5. #include <gfx.h>
  6. #endif
  7.  
  8. help()
  9. {
  10. printf("set text size or font\n");
  11. printf("tsf [options]\n");
  12. printf("options:\n");
  13. printf("   -w n         sets angle in degree\n");
  14. printf("   -xs n        sets size of characters (integers)\n");
  15. printf("   -ys n        sets size of characters (integers)\n");
  16. printf("   -xt n        sets repetition (thicknes) for x\n");
  17. printf("   -yt n        sets repetition (thicknes) for y\n");
  18. printf("   -font name   sets fontname\n");
  19. printf("   -c n         sets paper and ink colour\n");
  20. }
  21.  
  22. main(argc,argv)
  23. int argc;
  24. char *argv[];
  25. {
  26. int x,y,i,n,
  27.    xsize=0,
  28.    ysize=0,
  29.    xthick=0,
  30.    ythick=0,
  31.    angle=0,
  32.    colour=0;
  33. char s[80],fontname[80];
  34. float a;
  35.  
  36.    fontname[0]=0;
  37.    if(!checkopt(argc,argv,"-t",s)) help;
  38.    if(checkopt(argc,argv,"-w",s)) angle=atoi(s);
  39.    if(checkopt(argc,argv,"-xs",s)) xsize=atoi(s);
  40.    if(checkopt(argc,argv,"-ys",s)) ysize=atoi(s);
  41.    if(checkopt(argc,argv,"-xt",s)) xthick=atoi(s);
  42.    if(checkopt(argc,argv,"-yt",s)) ythick=atoi(s);
  43.    if(checkopt(argc,argv,"-font",s)) strcpy(fontname,s);
  44.    if(checkopt(argc,argv,"-c",s)) colour=atoi(s);
  45.  
  46.    tekopen();
  47.    textparam(xsize,ysize,xthick,ythick,angle,fontname);
  48.    if(colour>0) setcolour(colour);
  49.  
  50.    close(_tek4014);
  51.    exit(0);
  52. }
  53.